/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.domain.bo;

import com.comac.ins.common.core.validate.AddGroup;
import com.comac.ins.common.core.validate.EditGroup;
import com.comac.ins.common.mybatis.core.domain.BaseEntity;
import com.comac.ins.isfd.domain.IsfdLayupSkinPropertie;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;
import java.util.Map;

/**
 * 【请填写功能名称】业务对象 isfd_layup_skin_propertie
 *
 * @author Lion Li
 * @date 2024-08-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = IsfdLayupSkinPropertie.class, reverseConvertGenerate = true)
public class IsfdLayupSkinPropertieBo extends BaseEntity {

    /**
     * 对象存储主键
     */
    @NotNull(message = "对象存储主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 铺层代码
     */
    @NotBlank(message = "铺层代码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String plyCode;

    /**
     * 材料
     */
    @NotBlank(message = "材料不能为空", groups = { AddGroup.class, EditGroup.class })
    private String material;

    /**
     * 单层厚度
     */
    @NotNull(message = "单层厚度不能为空", groups = { AddGroup.class, EditGroup.class })
    private Double thickness;

    /**
     * 是否对称铺层
     */
    @NotNull(message = "是否对称铺层不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer symmetrical;

    /**
     * 铺层数据
     */
    @NotBlank(message = "铺层数据不能为空", groups = { AddGroup.class, EditGroup.class })
    private Map<String, plyData> plyData;

    /**
     * 是否包含自定义层
     */
    private Integer hasCustomPly;

    /**
     * 唯一值
     */
    private String hashUniqueKey;


    private String metadataManagementId;

    /**
     * 元数据管理ids，作为检索条件
     */
    private List<String> metadataManagementIds;

    /**
     * 铺层数据定义实体类
     */
    @Data
    public static class plyData {
        // 铺层方向
        private Integer value;

        // 自定义对象
        private customObject custom;
    }

    @Data
    public static class customObject {
        // 自定义材料
        private String material;

        // 单层厚度
        private Double thickness;
    }
}
